package ltd.hanamaki.study.collectionframe;

import ltd.hanamaki.study.collectionframe.pojo.User;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class ArrayListAndMap {

    public static void main(String[] args) {

        /* 创建一个 list 集合 */
        List<Map<Integer, String>> list = new ArrayList<>();

        List<User> user = new ArrayList<>();

        /* 创建一个 map 容器 */
        Map<Integer, String> map = new HashMap<>();
        Map<Integer, String> map1 = new HashMap<>();
        Map<Integer, String> map2 = new HashMap<>();


        User xh = new User();
        User xm = new User();
        User xl = new User();

        list.add(map);
        list.add(map1);
        list.add(map2);

        user.add(xh);
        user.add(xm);
        user.add(xl);

        System.out.println(list);
        System.out.println(user);

    }

}
